package com.yanqu.road.entity.activity.yingxin.game;

import com.alibaba.fastjson.annotation.JSONField;

import java.util.ArrayList;
import java.util.List;

public class YingXinGameData {

    private int head;
    private int cur;
    private int maxY;
    private List<YingXinLine> lines;

    public YingXinGameData clone() {
        YingXinGameData data = new YingXinGameData();
        data.setHead(this.head);
        data.setCur(this.cur);
        data.setMaxY(this.maxY);
        data.setLines(new ArrayList<>());
        for (YingXinLine line : new ArrayList<>(lines)) {
            data.getLines().add(line.clone());
        }
        return data;
    }

    public int getHead() {
        return head;
    }

    public void setHead(int head) {
        this.head = head;
    }

    public int getCur() {
        return cur;
    }

    public void setCur(int cur) {
        this.cur = cur;
    }

    public int getMaxY() {
        return maxY;
    }

    public void setMaxY(int maxY) {
        this.maxY = maxY;
    }

    public List<YingXinLine> getLines() {
        return lines;
    }

    public void setLines(List<YingXinLine> lines) {
        this.lines = lines;
    }

    // ==========================================================

    // 计算球停留位置时使用，不入库，不保证有值
    @JSONField(serialize = false)
    private long tmpUserId;

    public long getTmpUserId() {
        return tmpUserId;
    }

    public void setTmpUserId(long userId) {
        this.tmpUserId = userId;
    }
}
